home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_enscript.idb / usr / freeware / share / enscript / a2ps.hdr.z / a2ps.hdr
Encoding:
Text File  |  1998-10-28  |  2.2 KB  |  80 lines

  1. % a2ps styled header.
  2. % Copyright (c) 1996 Markku Rossi.
  3. % Author: Markku Rossi <mtr@iki.fi>
  4. %
  5.  
  6. %
  7. % This file is part of GNU enscript.
  8. % This program is free software; you can redistribute it and/or modify
  9. % it under the terms of the GNU General Public License as published by
  10. % the Free Software Foundation; either version 2, or (at your option)
  11. % any later version.
  12. %
  13. % This program is distributed in the hope that it will be useful,
  14. % but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. % GNU General Public License for more details.
  17. %
  18. % You should have received a copy of the GNU General Public License
  19. % along with this program; see the file COPYING.  If not, write to
  20. % the Free Software Foundation, 59 Temple Place - Suite 330,
  21. % Boston, MA 02111-1307, USA.
  22. %
  23.  
  24. % -- code follows this line --
  25. %Format: userstr    Printed by %n from %M
  26. %Format: datestr    %D{%b %d %Y %H:%M}
  27. %Format: upperpagestr    Page $V$%
  28. %Format: lowerpagestr    $V$%
  29.  
  30. %HeaderHeight: 38
  31. %FooterHeight: 15
  32.  
  33. % Fonts.
  34. /Helvetica /helvetica-encoded MF
  35. /SmallFont /helvetica-encoded findfont 12 scalefont def
  36.  
  37. /Helvetica-Bold /helvetica-bold-encoded MF
  38. /BigFont   /helvetica-bold-encoded findfont 15 scalefont def
  39.  
  40. /a2ps_marg 10 def
  41.  
  42. /do_header {    % print a2ps header
  43.   gsave
  44.     % lowerpagestr
  45.     SmallFont setfont
  46.     d_footer_x d_footer_w add lowerpagestr stringwidth pop sub
  47.     a2ps_marg sub
  48.     d_footer_y moveto lowerpagestr show
  49.  
  50.     % gray box to header
  51.     .95 setgray
  52.     d_header_x d_header_y d_header_w 24 Box fill
  53.     0 setgray
  54.  
  55.     % borders.
  56.     .5 setlinewidth
  57.     d_header_x d_header_y d_header_w 24 Box stroke
  58.     d_footer_x d_footer_y d_footer_h add d_output_w d_output_h Box stroke
  59.  
  60.     % userstr
  61.     d_header_x d_header_w add userstr stringwidth pop sub a2ps_marg sub 
  62.     d_header_y 29 add moveto userstr show
  63.  
  64.     % datestr
  65.     d_header_x a2ps_marg add d_header_y 6 add moveto datestr show
  66.  
  67.     % upperpagestr
  68.     d_header_x d_header_w add upperpagestr stringwidth pop sub
  69.     a2ps_marg sub 
  70.     d_header_y 6 add moveto upperpagestr show
  71.  
  72.     % filename
  73.     BigFont setfont
  74.     d_header_x d_header_w 2 div add ftail stringwidth pop 2 div sub 
  75.     d_header_y 6 add moveto ftail show
  76.   grestore
  77. } def
  78.